From 99e82a4d44650c98edb17836fcef743cc87a614a Mon Sep 17 00:00:00 2001
From: Alexander Krotov <ilabdsf@gmail.com>
Date: Thu, 19 Jul 2018 02:10:28 +0300
Subject: [PATCH] Ignore Xft errors when drawing text

---
 dwm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dwm.c b/dwm.c
index 4465af1..63a9df1 100644
--- a/dwm.c
+++ b/dwm.c
@@ -731,7 +731,11 @@ drawbar(Monitor *m)
 	if ((w = m->ww - sw - x) > bh) {
 		if (m->sel) {
 			drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
+			XSetErrorHandler(xerrordummy);
 			drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
+			XSync(dpy, False);
+			XSetErrorHandler(xerror);
+
 			if (m->sel->isfloating)
 				drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
 		} else {
-- 
2.18.0

